<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>经销商销售目标管理</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link rel="stylesheet" href="__STATIC__/layout/css/zTreeStyle.css" type="text/css">
     <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/sc/js/page.js"></script>
 <style>
    #gopage{color:blue;cursor: pointer;}
    #firstpage{cursor: pointer;}
    #pagesize{height:23px;}
      .is_yd{color:blue;text-decoration: line-through;}
    </style>
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
     <!-- 标题 -->
    <div class="page-heade">
       <h2 class="title_color text-center">经销商销售目标管理</h2>
    </div>
    <!-- 标题 -->
    <!-- 新增 -->
     <div class="padd col-md-12">
      <a href="{:url('Jingxiaomubiao/new_jx')}" class="btn btn-w-m btn-success">新增经销商销售目标申请</a>
    </div>
    <!-- 新增 -->

    <!-- 筛选 -->
      <form action="#" method="post" id="form_check" accept-charset="utf-8" class="container-fluid bud_dl formpage">
                      <input type="hidden" value='{$page}' name="page" id="page-go"/>
                      <input type="hidden" value='{$list}' name="list" id="list-go"/>
        <div class="row">
          <dl class="col-md-2">
            <dt>编号：</dt>
            <dd><input type="text" name="no" value="{$data.no}" placeholder="" class="form-control" ></dd>
          </dl>
          <dl class="col-md-2">
            <dt>主题：</dt>
            <dd><input type="text" name="title" value="{$data.title}" placeholder=""  class="form-control"></dd>
          </dl>
          <dl class="col-md-2">
            <dt>状态： </dt>
            <dd>
              <select  class="form-control" name="state" id="">
              <option value="0">请选择</option>
              {volist name="statearr" id="vo"}
                {if condition="$vo.id eq $data.state"}
                <option value="{$vo.id}" selected>{$vo.title}</option>
                {else/}
                <option value="{$vo.id}">{$vo.title}</option>
                {/if}
              {/volist}
            </select>
          </dd>
          </dl>
          <dl class="col-md-3">
            <dt>申请时间： </dt>
            <dd>
              <div class="form-width">
                <div class="form-group col-md-5">
                  <input placeholder="开始日期" readonly class="form-control layer-date " name="start" id="start" value="{$data.start}">
                </div>
                <div class="col-md-2 midd">
                  至
                </div>
              <div class="form-group col-md-5">
                <input placeholder="结束日期" readonly class="form-control layer-date" id="end" name="end" value="{$data.end}">
              </div>
              </div>
          </dd>
          </dl>
          <div class="col-md-3 form-row">
          
             <input type="button" value="查询" class='btn btn-outline btn-primary' id="check"/>
             <input type="button" value="清空查询条件" class='btn btn-outline btn-warning' id="clear_check"/>
                                    
          </div>
        </div>
      </form>
    <!-- 筛选 -->

    <!-- 表格 -->
    <div class="col-md-12 no-padding"  style="padding: 0 12px;">
    {if condition="$sum neq 0"}
        <table class="table table-hover table-bordered text-center table-striped bud_hei">
             <thead>
                                <tr class="info">
                                    <td>No</td>
                                    <td>类型</td>
                                    <td>编号</td>
                                    <td>主题</td>
                                    <td>状态</td>
                                    <td>申请人</td>
                                    <td>申请时间</td>
                                    <td>操作</td>
                                </tr>
                            </thead>
                            <tbody>
                              {volist name="apply" id="vo"}
                                <tr>  
                                    <td>{$i}</td>
                                    <td><span class="line">经销商销售目标申请</span>
                                    </td>
                                    <td><a href="javascript:;" onclick="newlay({$vo.id})">{$vo.no}</a></td>
                                      <td>
                                    {if $vo.tag==1}
                                    <span class="is_yd">
                                    {elseif $vo.state==7/}
                                     <span style="font-weight: bold;">
                                     {else/}
                                     <span>
                                     {/if}
                                    {$vo.title}
                                       {if $vo.tag==1}
                                      <span class="glyphicon glyphicon-remove delCssY" style="color:blue;" title="已异动" aria-hidden="true"></span>
                                    {elseif $vo.state==7/}
                                     <span class="glyphicon glyphicon-ok duigou" title="已生效" aria-hidden="true"></span>
                                     {else/}
                                     
                                     {/if}
                                    </span>
                                    </td>
                                     <td>
                                    {$vo.state_name}
                                    </td>
                                     <td>{$vo.cname}</td>
                                     <td><a href="javascript:;" class="amendProvince">{$vo.created_on}  </a></td>
                                     <td>  {if $vo.myId}
                                           <a href="{:url('Workflowdb/workflowchart',['id'=>$vo.myId])}" class="J_menuItem" title="查看流程图">查看流程图</a>
                                        {/if}</td>
                                </tr>
                               
                              {/volist}
                            </tbody>
        </table>
       <h5 class="text-center" id="pagesc" style="font-size: 16px;font-weight: 500">
            <script>
                            $(function(){
                                pageSC("pagesc",{$sum},{$page},{$maxpage})
                            })
                        </script>
          每页显示
          <select id="pagesize">
            <option value='10' {if condition="$list eq 10"}selected{/if}>10条</option>
            <option value='15'{if condition="$list eq 15"}selected{/if}>15条</option>
            <option value='20'{if condition="$list eq 20"}selected{/if}>20条</option>

          </select>
        </h5>
        {else/}
        <h3 class="text-center animated fadeIn">对不起没有查询到符合条件的信息</h3>
    {/if}
    <!-- 表格 -->
    
  
        
    </div>
    
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!-- <script src="js/plugins/layer/layer.min.js"></script> -->

    <!-- 自定义js -->
    <script src="__STATIC__/layout/js/content.js?v=1.0.0"></script>
     <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
    
    <!-- ztree -->
    <script type="text/javascript" src="__STATIC__/layout/js/jquery.ztree.core.js"></script>
    <script type="text/javascript" src="__STATIC__/layout/js/jquery.ztree.excheck.js"></script>
    <!-- <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script> -->
    <!--统计代码，可删除-->
    <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>

    <script src="__STATIC__/layout/js/contabs_sub.js"></script>
    <script>

        //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY/MM/DD',
            min: '2016-01-01 00:00:00', //设定最小日期为当前日期
            max: laydate.now(), //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY/MM/DD',
            min:'2016-01-01 00:00:00',
            max: laydate.now(),
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);
            //翻页
      
        $("#check").click(function(){
              $("#page-go").val(1);
            $(".formpage").submit();
        })
        $("#clear_check").click(function(){
            $("input[type='text']").val("");
            $("#page-go").val(1);
            $("#start").val("");
            $("#end").val("");
             $("select").val(0);
            $("#material_type_id").val(0);
             $(".formpage").submit();
        })
        function newlay(tid){
           parent.layer.open({
              type: 2,
              title: '经销商目标申请详细',
              shadeClose: true,
              shade: false,
              maxmin: true, //开启最大化最小化按钮
              area: ['1280px', '650px'],
              content: '{:url("Jingxiaomubiao/detail")}?tid='+tid
          });
        }
    </script>
</body>

</html>
